cmake_minimum_required(VERSION 4.0)
project(MindSporeLiteLLMInferNative)

if(DEFINED PACKAGE_FIND_FILE)
    include(${PACKAGE_FIND_FILE})
endif()

set(CMAKE_C_STANDARD 11)
# 显式设置库输出目录到当前源目录，避免歧义
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})
include_directories(${CMAKE_LIBRARY_OUTPUT_DIRECTORY}
                    ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/include)

file(GLOB_RECURSE SOURCES src/*.cpp)

add_library(MindSporeLiteLLMInferNative SHARED ${SOURCES})